package com.wpw.web.base;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;

/**
 * @Description:
 * @ClassName: CloneTest
 * @CreateDate: 2020-06-06 16:14
 * @author: wupengwei
 */
public class CloneTest {
    public static void main(String[] args) {


        new HashMap<>(4);

        int i = tableSizeFor(9);
        System.out.println(i);
    }

    static final int tableSizeFor(int cap) {
        int n = cap - 1;
        n |= n >>> 1;
        n |= n >>> 2;
        n |= n >>> 4;
        n |= n >>> 8;
        n |= n >>> 16;
        return  n + 1;
    }

}



